package mio.model;

import java.util.ArrayList;

public class Line {
	
	private int id;
	private String longName;
	private String description;
	private ArrayList<Stop> stops;

	public Line(int id, String longName, String description, ArrayList<Stop> stops){
		this.id = id;
		this.longName = longName;
		this.description = description;
		this.stops = stops;
	}
	
	public String toString(){
		return longName;
	}
	
	public String printCompleteLine(){
		StringBuilder sb = new StringBuilder();
		sb.append(longName);		
		sb.append(": " + stops.toString());
		
		return sb.toString();
	}
	
	public boolean equals(Object obj){
		if(!(obj instanceof Line))
			return false;
		
		Line other = (Line) obj;
		return id == other.getId();
	}

	public int getId() {
		return id;
	}

	public String getLongName() {
		return longName;
	}

	public String getDescription() {
		return description;
	}
	
	public ArrayList<Stop> getStops() {
		return stops;
	}
	
}
